package com.iotechn.unimall.app.api.association;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.dobbinsoft.fw.core.exception.ServiceException;
import com.iotechn.unimall.data.domain.AssociationDO;
import com.iotechn.unimall.data.mapper.AssociationMapper;
import org.springframework.stereotype.Service;

@Service("appAssociationService")
public class AssociationServiceImpl extends ServiceImpl<AssociationMapper, AssociationDO> implements AssociationService {

    @Override
    public AssociationDO detail(Long associationId) throws ServiceException {
        QueryWrapper<AssociationDO> wrapper = new QueryWrapper<>();
        wrapper.lambda().eq(AssociationDO::getId,associationId);
        return baseMapper.selectOne(wrapper);
    }
}
